<div style="border-bottom:5px solid silver;color:#392E1A;padding-bottom:10px;padding-top:10px;font-size:35px;"  dir="ltr">

<?php if ($this->getContext()->getUser()->isAuthenticated() && $this->getContext()->getUser()->hasCredential('admin')) { ?>


<?php echo link_to('<img src="/images/icons/pencil.png">','/editcompany/'.$company->getId());?>

<?php }?>



<?php echo $company->getName();?>





</div>
<div style="text-align:right;width:535px;background-color:white;height:160px;margin-bottom:10px;padding-top:10px;">
		


<div style="margin-left:233px;width:226px;height:75px;margin:5px;padding:0px;float:right;">
<div style="background-image:url('<?php 

$imageurl = $company->getLogoUrl();

echo preg_replace('/thumb/', 'big', $imageurl);

?>');background-repeat:no-repeat;width:225px;height:150px;"></div>
</div>

<div style="margin:5px;padding-right:5px;border-right:1px solid silver;background-color:white;font-size:13px;color:#000;height:130px;width:280px;text-align:right;padding-top:10px;float:left;" dir="rtl">
<span style="font-weight:bold">מידע כללי</span>
<table>
<?php if($company->getUrl()):?>

<tr>
<td width="85">

אתר:


</td>

<td>
<span style="font-weight:bold">

<a href="<?php echo $company->getUrl(); ?>" target="_blank"><?php echo $company->getUrl();?></a> <br>
</span>
</td>

</tr>
<?php endif;?>

<?php if($company->getLocation()):?>

<tr>
<td>

מיקום:

</td>
<td>
<span style="font-weight:bold">

<?php echo $company->getLocation(); ?> <br>	
</span>

</td>
</tr>
<?php endif;?>
<?php if($company->getFounded()):?>

<tr>
<td>
הקמה:

</td>

<td>
<span style="font-weight:bold">

<?php echo $company->getFounded(); ?> <br>	
</span>

</td>

</tr>
<?php endif;?>

<tr>
<td>
תגיות:
</td>

<td>
<div style="width:280px;">
<span style="font-weight:bold">

<?php //echo $company->getRounds();
$c = new Criteria();
$c->add(Tag2CompanyPeer::COMPANY_ID,$company->getId());
$c->addJoin(Tag2CompanyPeer::TAG_ID,TagsPeer::ID);
$tags = TagsPeer::doSelect($c);

foreach ($tags as $tag) {
	
	echo link_to($tag->getName().'','/welcome/showByTag?name='.$tag->getName().'').', ';
	
	
	
}

?></div>
</span>

</td>

</tr>

<?php if($company->getPerson2CompanysJoinPerson()):?>
<tr>
<td>
יזמים:
</td>

<td>
<span style="font-weight:bold">

<?php 

//echo $company->getFounders(); 

$founders = $company->getPerson2CompanysJoinPerson();

foreach ($founders as $founder) {
	$founder = $founder->getPerson();
	
	echo link_to($founder->getName().'','/welcome/showPersons?name='.$founder->getName().'').', ';
	
	
}


?><br>
</span>

</td>
</tr>

<?php endif;?>



<?php if($company->getTwitterUser()):?>
<tr>
<td>
טוויטר:
</td>

<td>
<span style="font-weight:bold">

<a href="http://www.twitter.com/<?php echo $company->getTwitterUser(); ?>" target="_blank"><?php echo $company->getTwitterUser(); ?></a><br>
</span>

</td>
</tr>

<?php endif;?>





<?php if($company->getBlogUrl()):?>
<tr>
<td>
בלוג:
</td>

<td>
<span style="font-weight:bold">

<a href="<?php echo $company->getBlogUrl(); ?>" target="_blank"><?php echo $company->getBlogUrl(); ?></a><br>
</span>

</td>
</tr>

<?php endif;?>




</table>
</div>
</div>

<div style="border-top:1px solid #EDEDED;padding-top:10px;padding-bottom:10px;">
<span style="color:#392E1A;font-weight:bold;">
תיאור
</span>
<br>
<?php echo $company->getDescription();?>

</div>
<div style="border-top:1px solid #EDEDED;padding-top:10px;padding-bottom:10px;">
<span style="font-weight:bold">
תגובות:
</span>
<br>
<ol class="commentlist" style="font-size:12px;">

<?php $comments = $company->getCompanyCommentss();?>

<?php 

$counter = '';
foreach ($comments as $comment) { $counter++; ?>
<li>
<span style="font-weight:bold">
<?php echo $counter;?>. <?php  

$commentuser = UserPeer::retrieveByPk($comment->getAuthorId());

echo $commentuser->getFullName();

?></span><br>
<?php echo $comment->getBody();?>

</li>
<?php } ?>

</ol>

<?php if ($this->getContext()->getUser()->isAuthenticated()) { ?>
<span style="font-weight:bold">
הוסף תגובה:
</span>
<br>
<?php echo form_tag('newcomment/'.$company->getId().'') ?>
<?php echo textarea_tag('commentbody', '', 'size=70x5 style="width:95%;padding:5px;"') ?>
<?php echo submit_tag('הוסף תגובה') ?>
</form>

<?php }?>
</div>
